<template>
  <view class="orderArrive">
    <nav-bar title="已送达订单"></nav-bar>
      <you-form
        ref="form"
        :showFormTitle="false"
        :formConfig="orderArriveConfig"
        v-model="orderArriveForm"
        @selectChange="selectChange"
      ></you-form>
      <you-bottom-btn
        :btnConfig="bottomBtnConfig"
        @clickSubmit="clickSubmit"
        @clickCancel="clickCancel"
      ></you-bottom-btn>
  </view>
</template>

<script>
  import { BASIC_FORM } from './formConfig/orderArrive'
  export default {
    name: 'OrderArrive',
    data() {
      return {
        orderArriveConfig:[],
        orderArriveForm:{},
        bottomBtnConfig: [
          { text: '提交', class: 'confirm', funcName: 'clickSubmit' }
        ],
      }
    },

    onLoad(options) {
      this.orderArriveConfig = uni.$u.deepClone(BASIC_FORM)
    },

    methods: {
      //表单提交
      async clickSubmit() {
        const formCheck = await this.$refs.form.checkFormData()
        if (!formCheck) return uni.$u.toast('请将表单数据填写完整')
        uni.redirectTo({ url: '/subPages/otherPages/businessOrder' })
        return
        const params = {
          ...this.basicData,
          memberCardId: this.memberCardId,
          orderNum: this.orderNum
        }
        api_user.addCase(params).then(res => {
          if (res.code !== 200) return
          uni.redirectTo({ url: '/subPages/userMine/memberBenefits/customServeList' })
        })
      }
    }
  }
</script>
<style lang="scss" scoped>
.orderArrive{
  height: 100%;
  background: #fff;
}
</style>